define(['app'],function(app){return {module: function($scope, $http, eventBusService, httpService, params) {

		$scope.form.father_id=params.father_id;
		httpService.post(app.urls.menu_select,{"id":params.father_id},function(data){
			if("0000" === data.code){
				$scope.menu_name = data.data[0].name;
				$scope.findButton(data.data[0].id);
			}else{
				alert(data.msg);
			}
		});

		$scope.findButton=function(menu_id){
			httpService.post(app.urls.button_select,{"menu_id":menu_id},function(data){
				if("0000" === data.code){
					$scope.buttons = data.data;
				}else{
					alert(data.msg);
				}
			});
		}
		//查询学校信息
		httpService.post(app.urls.unit_selectSchoolDetail,{},function(data){
			if("0000" === data.code){
				$scope.unit = data.data;
			}else{
				alert(data.msg);
			}
		});

		$scope.clickBtn=function(event){
			var menu = {};
			if(event=='update'){
				menu.url = "modules/content/baseinfo/unit/school/update?id="+$scope.unit.id+ "&father_id=" + params.father_id;
			}
			eventBusService.publish("modules.content.load",menu);
		}
	}}});